package testmodel;

import velox.jcr.mapper.declarative.DeclarativeMapper;
import velox.jcr.mapper.loader.SubNodeChildrenLoader;

public class OrderMapper extends DeclarativeMapper<Order> {
	public OrderMapper() {
		setCache(true);
		setClass(Order.class);
		setIdMapping("id");
		addBasicMapping("name");
		addBasicMapping("description");
		addDescendantsMapping("orderLines", "order-lines", OrderLine.class, new SubNodeChildrenLoader("order-lines"));
	}
}

